From: Florian Müllner Date: Fri, 6 Aug 2021 16:15:40 +0000 (+0200) Subject: appDisplay: Avoid a warning X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~145 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=26dc0fcd32a48a583853d3cab80eaa3706d65530;p=gnome-shell.git appDisplay: Avoid a warning At least the last stable release of gjs has an issue with async handlers for custom (i.e. defined in JS) GObject signals. The handler still works, but evoking it prints the following warning: JS ERROR: Error: Could not guess unspecified GValue type We can avoid the warning by using the addAction() convenience method, which makes for a small nice cleanup anyway. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4531 Part-of: --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f86a7bb67..012e88bd0 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -3531,8 +3531,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu { if (Shell.AppSystem.get_default().lookup_app('org.gnome.Software.desktop')) { this._appendSeparator(); - let item = this._appendMenuItem(_("Show Details")); - item.connect('activate', async () => { + this.addAction(_('Show Details'), async () => { let id = this._source.app.get_id(); let args = GLib.Variant.new('(ss)', [id, '']); const bus = await Gio.DBus.get(Gio.BusType.SESSION, null);